/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.scbcd.server.session;

import com.scbcd.server.entity.Employee;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

/**
 *
 * @author gowri
 */
@Stateless
public class EmployeeService implements EmployeeServiceLocal {
    
    @PersistenceContext(unitName = "SCBCDPU")
    private EntityManager em;


    public void create(final String firstName, final String lastName) throws Exception {
    
        Employee e=new Employee();

        e.setFirstName(firstName);
        e.setLastName(lastName);

        persist(e);
    }

    public void persist(Object object) {
        em.persist(object);
    }

 
}
